package com.fowo.api.model.sales.withdraw.product;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.excel.ImageConvert;
import com.fowo.api.sys.entity.SysFile;
import java.util.List;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 销售退货单子表 导入导出辅助模型 */
@Getter
@Setter
public class SalesWithdrawProductExcelPo {

  @Size(max = 50, message = "平台单号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "平台单号")
  private String platformOrderNo;

  @ExcelProperty(value = "图片", converter = ImageConvert.class)
  private List<SysFile> imgUrl;

  @Size(max = 50, message = "商品信息长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "商品信息")
  private String productInfo;

  @Size(max = 100, message = "品名长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "品名")
  private String productNameName;

  @ExcelIgnore
  @ExcelProperty(value = "品名")
  private Long productName;

  @Size(max = 50, message = "SKU长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "SKU")
  private String sku;

  @DateTimeFormat("yyyy年MM月dd日HH:mm:ss")
  @ExcelProperty(value = "订购时间")
  private java.util.Date orderTime;

  @ExcelProperty(value = "退货数量")
  private Integer returnQuantity;

  @ExcelProperty(value = "收货量")
  private Integer receivingQuantity;

  @Size(max = 50, message = "售后图片长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "售后图片")
  private String salesImg;

  @Size(max = 255, message = "处理方式长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "处理方式")
  private String handlerType;

  @Size(max = 50, message = "售后说明长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "售后说明")
  private String remark;

  @ExcelProperty(value = "数量")
  private Integer quantity;

  @ExcelProperty(value = "销毁量")
  private Integer destroyedQuantity;

  @ExcelProperty(value = "次品量")
  private Integer defectiveQuantity;

  @ExcelProperty(value = "可用量")
  private Integer availableQuantity;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "所属销售退货单")
  private String parentSalesWithdrawGlobalOrderNo;

  @ExcelIgnore
  @ExcelProperty(value = "所属销售退货单")
  private Long parentSalesWithdraw;

  @Size(max = 50, message = "单位出库成本长度不能超过20")
  @ExcelProperty(value = "单位出库成本")
  private java.math.BigDecimal outboundCost;
}
